﻿namespace dPet.Infrastructure.EntityFramework.ModelConfigurations
{
	using dPet.Domain.Models;
	using Hangerd.EntityFramework;

	public class InventoryBatchConfig : EntityTypeConfigBase<InventoryBatch>
	{
		public InventoryBatchConfig()
		{
			Property(ib => ib.BatchNumber)
				.IsRequired()
				.HasMaxLength(32);

			Property(ib => ib.HospitalId)
				.IsRequired()
				.HasMaxLength(32);

			Property(ib => ib.Operator)
				.HasMaxLength(50);

			HasMany(ib => ib.Details)
				.WithRequired();
		}
	}
}
